//
//  MXAcceptSuccessV.m
//  HNBaseProject
//
//  Created by xujie on 2024/6/6.
//

#import "MXAcceptSuccessV.h"

@implementation MXAcceptSuccessV

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self createUI];
    }
    return self;
}

- (void)createUI {
    
    self.width = kScreenW - 30;
    self.height = 50;
    
    self.backgroundColor = [UIColor colorWithHexString:@"#3b3b3b"];
    self.layer.cornerRadius = 15;
    self.layer.masksToBounds = YES;
    
    UIImageView *icon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"accept_success"]];
    [self addSubview:icon];
    
    UILabel *lab = [[UILabel alloc] init];
    lab.text = @"接受成功";
    lab.textColor = [UIColor whiteColor];
    lab.font =  PFRFont(14);
    [self addSubview:lab];
    [lab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self);
    }];
    
    [icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.width.mas_equalTo(20);
        make.right.mas_equalTo(lab.mas_left).offset(-10);
        make.centerY.mas_equalTo(lab);
    }];
    
}

@end
